/**
 * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.portlet.model.impl;

import com.liferay.portal.kernel.util.StringBundler;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.model.CacheModel;

import com.portlet.model.nguyenlieu;

import java.io.Serializable;

/**
 * The cache model class for representing nguyenlieu in entity cache.
 *
 * @author Thi
 * @see nguyenlieu
 * @generated
 */
public class nguyenlieuCacheModel implements CacheModel<nguyenlieu>,
	Serializable {
	@Override
	public String toString() {
		StringBundler sb = new StringBundler(7);

		sb.append("{maNguyenLieu=");
		sb.append(maNguyenLieu);
		sb.append(", tenNguyenLieu=");
		sb.append(tenNguyenLieu);
		sb.append(", ghiChu=");
		sb.append(ghiChu);
		sb.append("}");

		return sb.toString();
	}

	public nguyenlieu toEntityModel() {
		nguyenlieuImpl nguyenlieuImpl = new nguyenlieuImpl();

		if (maNguyenLieu == null) {
			nguyenlieuImpl.setMaNguyenLieu(StringPool.BLANK);
		}
		else {
			nguyenlieuImpl.setMaNguyenLieu(maNguyenLieu);
		}

		if (tenNguyenLieu == null) {
			nguyenlieuImpl.setTenNguyenLieu(StringPool.BLANK);
		}
		else {
			nguyenlieuImpl.setTenNguyenLieu(tenNguyenLieu);
		}

		if (ghiChu == null) {
			nguyenlieuImpl.setGhiChu(StringPool.BLANK);
		}
		else {
			nguyenlieuImpl.setGhiChu(ghiChu);
		}

		nguyenlieuImpl.resetOriginalValues();

		return nguyenlieuImpl;
	}

	public String maNguyenLieu;
	public String tenNguyenLieu;
	public String ghiChu;
}